package com.agilegroup.crm.requests;

import static com.agilegroup.crm.utils.CONSTANTS.*;

import java.util.ArrayList;

import com.agilegroup.crm.model.EmployeeData;
import com.octo.android.robospice.request.springandroid.SpringAndroidSpiceRequest;

public class UserLoginJsonRequest extends SpringAndroidSpiceRequest<EmployeeData>{
	
	private ArrayList<String> parameters;
	
	public UserLoginJsonRequest(ArrayList<String> parameters) {
		super(EmployeeData.class); 
		this.parameters=parameters;
	}
	

	@Override
	public EmployeeData loadDataFromNetwork() throws Exception {
		return getRestTemplate().getForObject(LOGIN_URL+parameters.get(0)+"/"+parameters.get(1)+".json", EmployeeData.class);
	}
}
